package com.rbac.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.rbac.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class SysUserVo extends BaseEntity {

    private Long id;

    private String username;

    private String password;

    private String nickName;

    private String gender;

    private String phone;

    private String email;

    private String avatarName;

    private String avatarPath;

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", shape = JsonFormat.Shape.STRING)
    private LocalDateTime birthday;

    private Boolean admin;

    /**
     * 状态：1启用、0禁用,2锁定，3密码过期，4，已注销
     */
    private String enabled;

    /**
     * 用户状态,false禁用，true启用
     */
    private Boolean state;

    /**
     * 密码重置时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", shape = JsonFormat.Shape.STRING)
    private LocalDateTime pwdResetTime;

    private List<SysRoleVo> roles;
}
